package hfdp.chp06.chp0605;

/**
 * Created by chei on 2016/8/31.
 */
public class MacroCommand implements Command {

    private Command[] commands;

    public MacroCommand(Command[] commands) {
        this.commands = commands;
    }

    @Override
    public void execute() {
        for(int i = 0;i < commands.length;i++){
            commands[i].execute();
        }
    }
}
